<%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="tiles" uri="http://struts.apache.org/tags-tiles"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fmt_rt" uri="http://java.sun.com/jstl/fmt_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml"%>
<%@ taglib prefix="x_rt" uri="http://java.sun.com/jstl/xml_rt"%>
<%@ taglib prefix="wr_fn" uri="http://njo.org/taglib/functions"%>
<table cellspacing="0" width="100%" border="0">
  <tbody>
  <tr><!-- site banner and project image -->
    <td valign="top" align="left">
      <a href="http://njo.3322.org/"><img alt="the njo software" src="${pageContext.request.contextPath}/images/njo_logo_wide.gif" align="left" border="0"/></a>
    </td>
<c:if test="${wr_fn:isUserInRole(pageContext.request, 'admin')}">
    <td valign="bottom" align="right">
    <form name="languageForm" method="post" action="${pageContext.request.contextPath}/processor.setlanguage.tiles">
      <select name="language" onchange="javascript:document.languageForm.submit();">
        <option value="zh_CN" ${'zh_CN'==pageContext.request.locale ? 'selected' : ''} >中文</option>
        <option value="en"  ${'en'==pageContext.request.locale ? 'selected' : ''}>英文</option>
        <option value="ja"  ${'ja'==pageContext.request.locale ? 'selected' : ''}>日文</option>
      </select>
    </form>
    </td>
</c:if>    
  </tr>
  </tbody>
</table>